import request from '@/utils/request/request'
import type { CommentItem, CommentResult, CommentsPageQuery } from '@/types/comment'
/**
 * 评论分页查询
 * @returns
 */
export const getCommentListAPI = (data: CommentsPageQuery) => {
  return request<CommentResult>({
    method: 'POST',
    url: '/comments/pageQuery',
    data,
  })
}
/**
 * 新增评论
 * @returns
 */
export const addCommentAPI = (data: CommentItem) => {
  return request({
    method: 'POST',
    url: '/comments',
    data,
  })
}
